#ifndef CSOCKET_H
#define CSOCKET_H

#include <QObject>
#include <QtWebSockets/QWebSocket>
#include <QtNetwork/QAbstractSocket>
#include <QtWebSockets/QtWebSockets>

class CSOCKET : public QObject
{
    Q_OBJECT
public:
    explicit CSOCKET(QObject *parent = nullptr);
    ~CSOCKET();



signals:

public slots:
    void onConnected();
    void onDisConnected();
    void onTextMessageReceived(const QString &message);
    void onError(QAbstractSocket::SocketError error);
    void onpong(quint64 elapsedTime, const QByteArray &payload);


private:
    QWebSocket *m_websocket;

};

#endif // CSOCKET_H
